Rules for integrands of the form (((a+b Sec[e+f x]))^m)(((c+d Sec[e+f x]))^n)

1.  ∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0

1:  ∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m∈(SuperPlus[ℤ])∧ n∈(SuperMinus[ℤ])

Derivation: Algebraic expansion

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m∈(SuperPlus[ℤ])∧ n∈(SuperMinus[ℤ]), then

∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  ⟶ (c^n) ∫(((1+(d/c) Sec[e+f x]))^n) ExpandTrig[(((a+b Sec[e+f x]))^m),x]dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_.*(c_+d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  c^n*Int[ExpandTrig[(1+d/c*csc[e+f*x])^n,(a+b*csc[e+f*x])^m,x],x] /;
FreeQ[{a,b,c,d,e,f,n},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && IGtQ[m,0] && ILtQ[n,0] && LtQ[m+n,2]

2:  ∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m∈ℤ ∧ n∈ℝ

Derivation: Algebraic simplification

Basis: If  b c+a d==0 ∧ (a^2)-(b^2)==0, then (a+b Sec[z]) (c+d Sec[z])==-a c ((Tan[z])^2)

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m∈ℤ ∧ n∈ℝ, then

∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  ⟶  (((-a c))^m) ∫((Tan[e+f x])^(2m)) (((c+d Sec[e+f x]))^(n-m))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_.*(c_+d_.*csc[e_.+f_.*x_])^n_.,x_Symbol] :=
  (-a*c)^m*Int[Cot[e+f*x]^(2*m)*(c+d*Csc[e+f*x])^(n-m),x] /;
FreeQ[{a,b,c,d,e,f,n},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && IntegerQ[m] && RationalQ[n] && Not[IntegerQ[n] && GtQ[m-n,0]]

3:  ∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^m)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m+(1/2)∈ℤ

Derivation: Algebraic expansion and piecewise constant extraction

Basis: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m+(1/2)∈ℤ, then (((a+b Sec[z]))^m) (((c+d Sec[z]))^m)==(((((-a c))^(m+(1/2))) ((Tan[z])^(2 m+1)))/((Sqrt[a+b Sec[z]]) (Sqrt[c+d Sec[z]])))

Basis: If  b c+a d==0 ∧ (a^2)-(b^2)==0, then (∂_x)((Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))==0

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m+(1/2)∈ℤ, then

∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^m)dx  ⟶  (((((-a c))^(m+(1/2))) Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]]))) ∫ ((Tan[e+f x])^(2 m))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(c_+d_.*csc[e_.+f_.*x_])^m_,x_Symbol] :=
  (-a*c)^(m+1/2)*Cot[e+f*x]/(Sqrt[a+b*Csc[e+f*x]]*Sqrt[c+d*Csc[e+f*x]])*Int[Cot[e+f*x]^(2*m),x] /;
FreeQ[{a,b,c,d,e,f,m},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && IntegerQ[m+1/2]

4.  ∫(Sqrt[a+b Sec[e+f x]]) (((c+d Sec[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0

1:  ∫(Sqrt[a+b Sec[e+f x]])(((c+d Sec[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ n>(1/2)

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ n>(1/2), then

∫(Sqrt[a+b Sec[e+f x]])(((c+d Sec[e+f x]))^n)dx  ⟶  
-((2 a c Tan[e+f x] (((c+d Sec[e+f x]))^(n-1)))/(f (2 n-1) (Sqrt[a+b Sec[e+f x]])))+c ∫(Sqrt[a+b Sec[e+f x]]) (((c+d Sec[e+f x]))^(n-1))dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]*(c_+d_.*csc[e_.+f_.*x_])^n_.,x_Symbol] :=
  2*a*c*Cot[e+f*x]*(c+d*Csc[e+f*x])^(n-1)/(f*(2*n-1)*Sqrt[a+b*Csc[e+f*x]]) + 
  c*Int[Sqrt[a+b*Csc[e+f*x]]*(c+d*Csc[e+f*x])^(n-1),x] /;
FreeQ[{a,b,c,d,e,f},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && GtQ[n,1/2]

2:  ∫(Sqrt[a+b Sec[e+f x]])(((c+d Sec[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ n<-(1/2)

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ n<-(1/2), then

∫(Sqrt[a+b Sec[e+f x]])(((c+d Sec[e+f x]))^n)dx  ⟶  
((2 a Tan[e+f x] (((c+d Sec[e+f x]))^n))/(f (2 n+1) (Sqrt[a+b Sec[e+f x]])))+(1/c) ∫(Sqrt[a+b Sec[e+f x]]) (((c+d Sec[e+f x]))^(n+1))dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]*(c_+d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -2*a*Cot[e+f*x]*(c+d*Csc[e+f*x])^n/(f*(2*n+1)*Sqrt[a+b*Csc[e+f*x]]) + 
  1/c*Int[Sqrt[a+b*Csc[e+f*x]]*(c+d*Csc[e+f*x])^(n+1),x] /;
FreeQ[{a,b,c,d,e,f},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && LtQ[n,-1/2]

5.  ∫(((a+b Sec[e+f x]))^(3/2)) (((c+d Sec[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0

1:  ∫(((a+b Sec[e+f x]))^(3/2))(((c+d Sec[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ n<-(1/2)

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ n<-(1/2), then

∫(((a+b Sec[e+f x]))^(3/2))(((c+d Sec[e+f x]))^n)dx  ⟶  
((4 (a^2) Tan[e+f x] (((c+d Sec[e+f x]))^n))/(f (2 n+1) (Sqrt[a+b Sec[e+f x]])))+(a/c) ∫(Sqrt[a+b Sec[e+f x]]) (((c+d Sec[e+f x]))^(n+1))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^(3/2)*(c_+d_.*csc[e_.+f_.*x_])^n_.,x_Symbol] :=
  -4*a^2*Cot[e+f*x]*(c+d*Csc[e+f*x])^n/(f*(2*n+1)*Sqrt[a+b*Csc[e+f*x]]) + 
  a/c*Int[Sqrt[a+b*Csc[e+f*x]]*(c+d*Csc[e+f*x])^(n+1),x] /;
FreeQ[{a,b,c,d,e,f},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && LtQ[n,-1/2]

2:  ∫(((a+b Sec[e+f x]))^(3/2))(((c+d Sec[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ n≰-(1/2)

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ n≰-(1/2), then

∫(((a+b Sec[e+f x]))^(3/2))(((c+d Sec[e+f x]))^n)dx  ⟶  
((2 (a^2) Tan[e+f x] (((c+d Sec[e+f x]))^n))/(f (2 n+1) (Sqrt[a+b Sec[e+f x]])))+a ∫(Sqrt[a+b Sec[e+f x]]) (((c+d Sec[e+f x]))^n)dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^(3/2)*(c_+d_.*csc[e_.+f_.*x_])^n_.,x_Symbol] :=
  -2*a^2*Cot[e+f*x]*(c+d*Csc[e+f*x])^n/(f*(2*n+1)*Sqrt[a+b*Csc[e+f*x]]) + 
  a*Int[Sqrt[a+b*Csc[e+f*x]]*(c+d*Csc[e+f*x])^n,x] /;
FreeQ[{a,b,c,d,e,f,n},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && Not[LeQ[n,-1/2]]

6:  ∫(((a+b Sec[e+f x]))^(5/2))(((c+d Sec[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ n<-(1/2)

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ n<-(1/2), then

∫(((a+b Sec[e+f x]))^(5/2))(((c+d Sec[e+f x]))^n)dx  ⟶  
((8 (a^3) Tan[e+f x] (((c+d Sec[e+f x]))^n))/(f (2 n+1) (Sqrt[a+b Sec[e+f x]])))+((a^2)/(c^2))∫(Sqrt[a+b Sec[e+f x]]) (((c+d Sec[e+f x]))^(n+2))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^(5/2)*(c_+d_.*csc[e_.+f_.*x_])^n_.,x_Symbol] :=
  -8*a^3*Cot[e+f*x]*(c+d*Csc[e+f*x])^n/(f*(2*n+1)*Sqrt[a+b*Csc[e+f*x]]) + 
  a^2/c^2*Int[Sqrt[a+b*Csc[e+f*x]]*(c+d*Csc[e+f*x])^(n+2),x] /;
FreeQ[{a,b,c,d,e,f},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && LtQ[n,-1/2]

7:  ∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m-(1/2)∈ℤ ∧ m+n==0

Derivation: Piecewise constant extraction and integration by substitution

Basis: If  b c+a d==0 ∧ (a^2)-(b^2)==0, then (∂_x)((Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))==0

Basis: If  b c+a d==0 ∧ (a^2)-(b^2)==0, then -((a c Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))((Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))==1

Basis: Tan[e+f x] F[Sec[e+f x]]==-(1/f) Subst[((F[(1/x)])/x),x,Cos[e+f x]] (∂_x)Cos[e+f x]

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0 ∧ m-(1/2)∈ℤ ∧ m+n==0, then

∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  ⟶  -((a c Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]]))) ∫ Tan[e+f x] (((a+b Sec[e+f x]))^(m-(1/2))) (((c+d Sec[e+f x]))^(n-(1/2)))dx

  ⟶  ((a c Tan[e+f x])/(f (Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]]))) Subst[∫(((((b+a x))^(m-(1/2))) (((d+c x))^(n-(1/2))))/(x^(m+n)))dx,x,Cos[e+f x]]

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(c_+d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  -a*c*Cot[e+f*x]/(f*Sqrt[a+b*Csc[e+f*x]]*Sqrt[c+d*Csc[e+f*x]])*
    Subst[Int[(b+a*x)^(m-1/2)*(d+c*x)^(n-1/2)/x^(m+n),x],x,Sin[e+f*x]] /;
FreeQ[{a,b,c,d,e,f},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0] && IntegerQ[m-1/2] && EqQ[m+n,0]

8:  ∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  when  b c+a d==0 ∧ (a^2)-(b^2)==0

Derivation: Piecewise constant extraction and integration by substitution

Basis: If  b c+a d==0 ∧ (a^2)-(b^2)==0, then (∂_x)((Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))==0

Basis: If  b c+a d==0 ∧ (a^2)-(b^2)==0, then -((a c Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))((Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))==1

Basis: Tan[e+f x] F[Sec[e+f x]]==(1/f) Subst[((F[x])/x),x,Sec[e+f x]] (∂_x)Sec[e+f x]

Rule: If  b c+a d==0 ∧ (a^2)-(b^2)==0, then

∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  ⟶  -((a c Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]]))) ∫ Tan[e+f x] (((a+b Sec[e+f x]))^(m-(1/2))) (((c+d Sec[e+f x]))^(n-(1/2)))dx

  ⟶  -((a c Tan[e+f x])/(f (Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]]))) Subst[∫(((((a+b x))^(m-(1/2))) (((c+d x))^(n-(1/2))))/x)dx,x,Sec[e+f x]]

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_.*(c_+d_.*csc[e_.+f_.*x_])^n_.,x_Symbol] :=
  a*c*Cot[e+f*x]/(f*Sqrt[a+b*Csc[e+f*x]]*Sqrt[c+d*Csc[e+f*x]])*Subst[Int[(a+b*x)^(m-1/2)*(c+d*x)^(n-1/2)/x,x],x,Csc[e+f*x]] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && EqQ[b*c+a*d,0] && EqQ[a^2-b^2,0]

2.  ∫(((a+b Sec[e+f x]))^m) (c+d Sec[e+f x])dx  when  b c-a d≠0

1.  ∫(((a+b Sec[e+f x]))^m)(c+d Sec[e+f x])dx  when  b c-a d≠0 ∧ m>0

1.  ∫(a+b Sec[e+f x])(c+d Sec[e+f x])dx  when  b c-a d≠0

1:  ∫(a+b Sec[e+f x]) (c+d Sec[e+f x])dx  when  b c+a d==0

Derivation: Algebraic expansion

Basis: If  b c+a d==0, then (a+b z) (c+d z)==a c+b d (z^2)

Rule: If  b c+a d==0, then

∫(a+b Sec[e+f x]) (c+d Sec[e+f x])dx  ⟶  a c x+b d∫((Sec[e+f x])^2)dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])*(c_+d_.*csc[e_.+f_.*x_]),x_Symbol] :=
  a*c*x + b*d*Int[Csc[e+f*x]^2,x] /;
FreeQ[{a,b,c,d,e,f},x] && EqQ[b*c+a*d,0]

2:  ∫(a+b Sec[e+f x]) (c+d Sec[e+f x])dx  when  b c-a d≠0 ∧ b c+a d≠0

Derivation: Algebraic expansion

Basis: (c+d z) (a+b z)==a c+(b c+a d) z+b d (z^2)

Rule: If  b c-a d≠0 ∧ b c+a d≠0, then

∫(a+b Sec[e+f x]) (c+d Sec[e+f x])dx  ⟶  a c x+(b c+a d)∫Sec[e+f x]dx+b d∫((Sec[e+f x])^2)dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])*(c_+d_.*csc[e_.+f_.*x_]),x_Symbol] :=
  a*c*x + (b*c+a*d)*Int[Csc[e+f*x],x] + b*d*Int[Csc[e+f*x]^2,x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[b*c+a*d,0]

2.  ∫(Sqrt[a+b Sec[e+f x]])(c+d Sec[e+f x])dx  when  b c-a d≠0

1:  ∫(Sqrt[a+b Sec[e+f x]])(c+d Sec[e+f x])dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0

Derivation: Algebraic expansion

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0, then

∫(Sqrt[a+b Sec[e+f x]])(c+d Sec[e+f x])dx  ⟶  c∫(Sqrt[a+b Sec[e+f x]])dx+d∫(Sqrt[a+b Sec[e+f x]]) Sec[e+f x]dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]*(c_+d_.*csc[e_.+f_.*x_]),x_Symbol] :=
  c*Int[Sqrt[a+b*Csc[e+f*x]],x] + d*Int[Sqrt[a+b*Csc[e+f*x]]*Csc[e+f*x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0]

2:  ∫(Sqrt[a+b Sec[e+f x]])(c+d Sec[e+f x])dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Basis: (Sqrt[a+b z]) (c+d z)==((a c)/(Sqrt[a+b z]))+((z (b c+a d+b d z))/(Sqrt[a+b z]))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0, then

∫(Sqrt[a+b Sec[e+f x]])(c+d Sec[e+f x])dx  ⟶  a c∫(1/(Sqrt[a+b Sec[e+f x]]))dx+∫((Sec[e+f x] (b c+a d+b d Sec[e+f x]))/(Sqrt[a+b Sec[e+f x]]))dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]*(c_+d_.*csc[e_.+f_.*x_]),x_Symbol] :=
  a*c*Int[1/Sqrt[a+b*Csc[e+f*x]],x] + 
 Int[Csc[e+f*x]*(b*c+a*d+b*d*Csc[e+f*x])/Sqrt[a+b*Csc[e+f*x]],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0]

3.  ∫(((a+b Sec[e+f x]))^m)(c+d Sec[e+f x])dx  when  b c-a d≠0 ∧ m>1

1:  ∫(((a+b Sec[e+f x]))^m)(c+d Sec[e+f x])dx  when  b c-a d≠0 ∧ m>1 ∧ (a^2)-(b^2)==0

Derivation: Singly degenerate secant recurrence 1b with n->0,p->0

Rule: If  b c-a d≠0 ∧ m>1 ∧ (a^2)-(b^2)==0, then

∫(((a+b Sec[e+f x]))^m)(c+d Sec[e+f x])dx  ⟶  
((b d Tan[e+f x] (((a+b Sec[e+f x]))^(m-1)))/(f m))+(1/m)∫(((a+b Sec[e+f x]))^(m-1)) (a c m+(b c m+a d (2 m-1)) Sec[e+f x])dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(c_+d_.*csc[e_.+f_.*x_]),x_Symbol] :=
  -b*d*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m-1)/(f*m) + 
  1/m*Int[(a+b*Csc[e+f*x])^(m-1)*Simp[a*c*m+(b*c*m+a*d*(2*m-1))*Csc[e+f*x],x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && GtQ[m,1] && EqQ[a^2-b^2,0] && IntegerQ[2*m]

2:  ∫(((a+b Sec[e+f x]))^m)(c+d Sec[e+f x])dx  when  b c-a d≠0 ∧ m>1 ∧ (a^2)-(b^2)≠0

Derivation: Cosecant recurrence 1b with c->a c,d->b c+a d,C->b d,m->0,n->n-1

Rule: If  b c-a d≠0 ∧ m>1 ∧ (a^2)-(b^2)≠0, then

∫(((a+b Sec[e+f x]))^m)(c+d Sec[e+f x])dx  ⟶  
((b d Tan[e+f x](((a+b Sec[e+f x]))^(m-1)))/(f m))+
(1/m)∫(((a+b Sec[e+f x]))^(m-2))((a^2) c m+((b^2) d (m-1)+2 a b c m+(a^2) d m)Sec[e+f x]+b(b c m+a d (2 m-1))((Sec[e+f x])^2))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(c_+d_.*csc[e_.+f_.*x_]),x_Symbol] :=
  -b*d*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m-1)/(f*m) + 
  1/m*Int[(a+b*Csc[e+f*x])^(m-2)*
    Simp[a^2*c*m+(b^2*d*(m-1)+2*a*b*c*m+a^2*d*m)*Csc[e+f*x]+b*(b*c*m+a*d*(2*m-1))*Csc[e+f*x]^2,x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && GtQ[m,1] && NeQ[a^2-b^2,0] && IntegerQ[2*m]

2.  ∫(((a+b Sec[e+f x]))^m)(c+d Sec[e+f x])dx  when  b c-a d≠0 ∧ m<0

1:  ∫((c+d Sec[e+f x])/(a+b Sec[e+f x]))dx  when  b c-a d≠0

Derivation: Algebraic expansion

Basis: ((c+d z)/(a+b z))==(c/a)-(((b c-a d)z)/(a(a+b z)))

Rule: If  b c-a d≠0, then

∫((c+d Sec[e+f x])/(a+b Sec[e+f x]))dx  ⟶  ((c x)/a)-((b c-a d)/a)∫((Sec[e+f x])/(a+b Sec[e+f x]))dx

Program code:

Int[(c_+d_.*csc[e_.+f_.*x_])/(a_+b_.*csc[e_.+f_.*x_]),x_Symbol] :=
  c*x/a - (b*c-a*d)/a*Int[Csc[e+f*x]/(a+b*Csc[e+f*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0]

2.  ∫((c+d Sec[e+f x])/(Sqrt[a+b Sec[e+f x]]))dx  when  b c-a d≠0

1:  ∫((c+d Sec[e+f x])/(Sqrt[a+b Sec[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0

Derivation: Algebraic expansion

Basis: ((c+d z)/(Sqrt[a+b z]))==((c(Sqrt[a+b z]))/a)-(((b c-a d)z)/(a(Sqrt[a+b z])))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0, then

∫((c+d Sec[e+f x])/(Sqrt[a+b Sec[e+f x]]))dx  ⟶  (c/a)∫(Sqrt[a+b Sec[e+f x]])dx-((b c-a d)/a)∫((Sec[e+f x])/(Sqrt[a+b Sec[e+f x]]))dx

Program code:

Int[(c_+d_.*csc[e_.+f_.*x_])/Sqrt[a_+b_.*csc[e_.+f_.*x_]],x_Symbol] :=
  c/a*Int[Sqrt[a+b*Csc[e+f*x]],x] - (b*c-a*d)/a*Int[Csc[e+f*x]/Sqrt[a+b*Csc[e+f*x]],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0]

2:  ∫((c+d Sec[e+f x])/(Sqrt[a+b Sec[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0

Derivation: Algebraic expansion

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0, then

∫((c+d Sec[e+f x])/(Sqrt[a+b Sec[e+f x]]))dx  ⟶  c∫(1/(Sqrt[a+b Sec[e+f x]]))dx+d∫((Sec[e+f x])/(Sqrt[a+b Sec[e+f x]]))dx

Program code:

Int[(c_+d_.*csc[e_.+f_.*x_])/Sqrt[a_+b_.*csc[e_.+f_.*x_]],x_Symbol] :=
  c*Int[1/Sqrt[a+b*Csc[e+f*x]],x] + d*Int[Csc[e+f*x]/Sqrt[a+b*Csc[e+f*x]],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0]

3.  ∫(((a+b Sec[e+f x]))^m)(c+d Sec[e+f x])dx  when  b c-a d≠0 ∧ m<-1

1:  ∫(((a+b Sec[e+f x]))^m)(c+d Sec[e+f x])dx  when  b c-a d≠0 ∧ m<-1 ∧ (a^2)-(b^2)==0

Derivation: Singly degenerate secant recurrence 2b with n->0,p->0

Rule: If  b c-a d≠0 ∧ m<-1 ∧ (a^2)-(b^2)==0, then

∫(((a+b Sec[e+f x]))^m)(c+d Sec[e+f x])dx  ⟶  
(((b c-a d) Tan[e+f x] (((a+b Sec[e+f x]))^m))/(b f (2 m+1)))+
(1/((a^2) (2 m+1)))∫(((a+b Sec[e+f x]))^(m+1)) (a c (2 m+1)-(b c-a d) (m+1) Sec[e+f x])dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(c_+d_.*csc[e_.+f_.*x_]),x_Symbol] :=
  -(b*c-a*d)*Cot[e+f*x]*(a+b*Csc[e+f*x])^m/(b*f*(2*m+1)) + 
  1/(a^2*(2*m+1))*Int[(a+b*Csc[e+f*x])^(m+1)*Simp[a*c*(2*m+1)-(b*c-a*d)*(m+1)*Csc[e+f*x],x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && LtQ[m,-1] && EqQ[a^2-b^2,0] && IntegerQ[2*m]

2:  ∫(((a+b Sec[e+f x]))^m)(c+d Sec[e+f x])dx  when  b c-a d≠0 ∧ m<-1 ∧ (a^2)-(b^2)≠0

Derivation: Cosecant recurrence 2b with C->0,m->0

Rule: If  b c-a d≠0 ∧ m<-1 ∧ (a^2)-(b^2)≠0, then

∫(((a+b Sec[e+f x]))^m)(c+d Sec[e+f x])dx  ⟶  
-((b(b c-a d) Tan[e+f x](((a+b Sec[e+f x]))^(m+1)))/(a f (m+1) ((a^2)-(b^2))))+
(1/(a (m+1) ((a^2)-(b^2))))∫(((a+b Sec[e+f x]))^(m+1))(c ((a^2)-(b^2)) (m+1)-a(b c-a d)(m+1)Sec[e+f x]+b(b c-a d)(m+2)((Sec[e+f x])^2))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(c_+d_.*csc[e_.+f_.*x_]),x_Symbol] :=
  b*(b*c-a*d)*Cot[e+f*x]*(a+b*Csc[e+f*x])^(m+1)/(a*f*(m+1)*(a^2-b^2)) + 
  1/(a*(m+1)*(a^2-b^2))*Int[(a+b*Csc[e+f*x])^(m+1)*
    Simp[c*(a^2-b^2)*(m+1)-(a*(b*c-a*d)*(m+1))*Csc[e+f*x]+b*(b*c-a*d)*(m+2)*Csc[e+f*x]^2,x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && LtQ[m,-1] && NeQ[a^2-b^2,0] && IntegerQ[2*m]

3:  ∫(((a+b Sec[e+f x]))^m)(c+d Sec[e+f x])dx  when  b c-a d≠0 ∧ 2m∉ℤ

Derivation: Algebraic expansion

Rule: If  b c-a d≠0 ∧ 2m∉ℤ, then

∫(((a+b Sec[e+f x]))^m)(c+d Sec[e+f x])dx  ⟶  c∫(((a+b Sec[e+f x]))^m)dx+d∫(((a+b Sec[e+f x]))^m) Sec[e+f x]dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(c_+d_.*csc[e_.+f_.*x_]),x_Symbol] :=
  c*Int[(a+b*Csc[e+f*x])^m,x] + d*Int[(a+b*Csc[e+f*x])^m*Csc[e+f*x],x] /;
FreeQ[{a,b,c,d,e,f,m},x] && NeQ[b*c-a*d,0] && Not[IntegerQ[2*m]]

3.  ∫((((a+b Sec[e+f x]))^m)/(c+d Sec[e+f x]))dx  when  b c-a d≠0

1.  ∫((Sqrt[a+b Sec[e+f x]])/(c+d Sec[e+f x]))dx  when  b c-a d≠0

1:  ∫((Sqrt[a+b Sec[e+f x]])/(c+d Sec[e+f x]))dx  when  b c-a d≠0 ∧ ((a^2)-(b^2)==0 ∨ (c^2)-(d^2)==0)

Derivation: Algebraic expansion

Basis: (1/(c+d z))==(1/c)-((d z)/(c(c+d z)))

Rule: If  b c-a d≠0 ∧ ((a^2)-(b^2)==0 ∨ (c^2)-(d^2)==0), then

∫((Sqrt[a+b Sec[e+f x]])/(c+d Sec[e+f x]))dx  ⟶  (1/c)∫(Sqrt[a+b Sec[e+f x]])dx-(d/c)∫((Sec[e+f x] (Sqrt[a+b Sec[e+f x]]))/(c+d Sec[e+f x]))dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]/(c_+d_.*csc[e_.+f_.*x_]),x_Symbol] :=
  1/c*Int[Sqrt[a+b*Csc[e+f*x]],x] - d/c*Int[Csc[e+f*x]*Sqrt[a+b*Csc[e+f*x]]/(c+d*Csc[e+f*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && (EqQ[a^2-b^2,0] || EqQ[c^2-d^2,0])

2:  ∫((Sqrt[a+b Sec[e+f x]])/(c+d Sec[e+f x]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

Derivation: Algebraic expansion

Basis: ((Sqrt[a+b z])/(c+d z))==(a/(c (Sqrt[a+b z])))+(((b c-a d)z)/(c (Sqrt[a+b z]) (c+d z)))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0, then

∫((Sqrt[a+b Sec[e+f x]])/(c+d Sec[e+f x]))dx  ⟶  (a/c)∫(1/(Sqrt[a+b Sec[e+f x]]))dx+((b c-a d)/c)∫((Sec[e+f x])/((Sqrt[a+b Sec[e+f x]])(c+d Sec[e+f x])))dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]/(c_+d_.*csc[e_.+f_.*x_]),x_Symbol] :=
  a/c*Int[1/Sqrt[a+b*Csc[e+f*x]],x] + (b*c-a*d)/c*Int[Csc[e+f*x]/(Sqrt[a+b*Csc[e+f*x]]*(c+d*Csc[e+f*x])),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0]

2.  ∫((((a+b Sec[e+f x]))^(3/2))/(c+d Sec[e+f x]))dx  when  b c-a d≠0

1:  ∫((((a+b Sec[e+f x]))^(3/2))/(c+d Sec[e+f x]))dx  when  b c-a d≠0 ∧ ((a^2)-(b^2)==0 ∨ (c^2)-(d^2)==0)

Derivation: Algebraic expansion

Basis: ((((a+b z))^(3/2))/(c+d z))==((a (Sqrt[a+b z]))/c)+(((b c-a d) z (Sqrt[a+b z]))/(c (c+d z)))

Rule: If  b c-a d≠0 ∧ ((a^2)-(b^2)==0 ∨ (c^2)-(d^2)==0), then

∫((((a+b Sec[e+f x]))^(3/2))/(c+d Sec[e+f x]))dx  ⟶  (a/c)∫(Sqrt[a+b Sec[e+f x]])dx+((b c-a d)/c)∫((Sec[e+f x] (Sqrt[a+b Sec[e+f x]]))/(c+d Sec[e+f x]))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^(3/2)/(c_+d_.*csc[e_.+f_.*x_]),x_Symbol] :=
  a/c*Int[Sqrt[a+b*Csc[e+f*x]],x] + (b*c-a*d)/c*Int[Csc[e+f*x]*Sqrt[a+b*Csc[e+f*x]]/(c+d*Csc[e+f*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && (EqQ[a^2-b^2,0] || EqQ[c^2-d^2,0])

x:  ∫((((a+b Sec[e+f x]))^(3/2))/(c+d Sec[e+f x]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

Derivation: Algebraic expansion

Basis: ((((a+b z))^(3/2))/(c+d z))==((b (Sqrt[a+b z]))/d)-(((b c-a d) (Sqrt[a+b z]))/(d(c+d z)))

Note: This rule results in 3 EllipticPi terms.

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0, then

∫((((a+b Sec[e+f x]))^(3/2))/(c+d Sec[e+f x]))dx  ⟶  (b/d)∫(Sqrt[a+b Sec[e+f x]])dx-((b c-a d)/d)∫((Sqrt[a+b Sec[e+f x]])/(c+d Sec[e+f x]))dx

Program code:

(* Int[(a_+b_.*csc[e_.+f_.*x_])^(3/2)/(c_+d_.*csc[e_.+f_.*x_]),x_Symbol] :=
  b/d*Int[Sqrt[a+b*Csc[e+f*x]],x] - (b*c-a*d)/d*Int[Sqrt[a+b*Csc[e+f*x]]/(c+d*Csc[e+f*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0] *)

2:  ∫((((a+b Sec[e+f x]))^(3/2))/(c+d Sec[e+f x]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

Derivation: Algebraic expansion

Basis: ((((a+b z))^(3/2))/(c+d z))==((((a+b z))^2)/((Sqrt[a+b z])(c+d z)))==(((a^2) d+(b^2) c z)/(c d (Sqrt[a+b z])))-(((((b c-a d))^2) z)/(c d (Sqrt[a+b z])(c+d z)))

Note: This rule results in 2 EllipticPi terms and 1 EllipticF term.

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0, then

∫((((a+b Sec[e+f x]))^(3/2))/(c+d Sec[e+f x]))dx  ⟶  (1/(c d))∫(((a^2) d+(b^2) c Sec[e+f x])/(Sqrt[a+b Sec[e+f x]]))dx-((((b c-a d))^2)/(c d))∫((Sec[e+f x])/((Sqrt[a+b Sec[e+f x]])(c+d Sec[e+f x])))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^(3/2)/(c_+d_.*csc[e_.+f_.*x_]),x_Symbol] :=
  1/(c*d)*Int[(a^2*d+b^2*c*Csc[e+f*x])/Sqrt[a+b*Csc[e+f*x]],x] - 
  (b*c-a*d)^2/(c*d)*Int[Csc[e+f*x]/(Sqrt[a+b*Csc[e+f*x]]*(c+d*Csc[e+f*x])),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0]

3.  ∫(1/((Sqrt[a+b Sec[e+f x]]) (c+d Sec[e+f x])))dx  when  b c-a d≠0

1:  ∫(1/((Sqrt[a+b Sec[e+f x]]) (c+d Sec[e+f x])))dx  when  b c-a d≠0 ∧ ((a^2)-(b^2)==0 ∨ (c^2)-(d^2)==0)

Derivation: Algebraic expansion

Basis: (1/((Sqrt[a+b z]) (c+d z)))==((b c-a d-b d z)/(c (b c-a d) (Sqrt[a+b z])))+(((d^2) z (Sqrt[a+b z]))/(c (b c-a d) (c+d z)))

Rule: If  b c-a d≠0 ∧ ((a^2)-(b^2)==0 ∨ (c^2)-(d^2)==0), then

∫(1/((Sqrt[a+b Sec[e+f x]]) (c+d Sec[e+f x])))dx  ⟶  (1/(c(b c-a d)))∫((b c-a d-b d Sec[e+f x])/(Sqrt[a+b Sec[e+f x]]))dx+((d^2)/(c(b c-a d)))∫((Sec[e+f x] (Sqrt[a+b Sec[e+f x]]))/(c+d Sec[e+f x]))dx

Program code:

Int[1/(Sqrt[a_+b_.*csc[e_.+f_.*x_]]*(c_+d_.*csc[e_.+f_.*x_])),x_Symbol] :=
  1/(c*(b*c-a*d))*Int[(b*c-a*d-b*d*Csc[e+f*x])/Sqrt[a+b*Csc[e+f*x]],x] + 
  d^2/(c*(b*c-a*d))*Int[Csc[e+f*x]*Sqrt[a+b*Csc[e+f*x]]/(c+d*Csc[e+f*x]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && (EqQ[a^2-b^2,0] || EqQ[c^2-d^2,0])

2:  ∫(1/((Sqrt[a+b Sec[e+f x]]) (c+d Sec[e+f x])))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

Derivation: Algebraic expansion

Basis: (1/(c+d Sec[z]))==(1/c)-(d/(c(d+c Cos[z])))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0, then

∫(1/((Sqrt[a+b Sec[e+f x]]) (c+d Sec[e+f x])))dx  ⟶  (1/c)∫(1/(Sqrt[a+b Sec[e+f x]]))dx-(d/c)∫((Sec[e+f x])/((Sqrt[a+b Sec[e+f x]])(c+d Sec[e+f x])))dx

Program code:

Int[1/(Sqrt[a_+b_.*csc[e_.+f_.*x_]]*(c_+d_.*csc[e_.+f_.*x_])),x_Symbol] :=
  1/c*Int[1/Sqrt[a+b*Csc[e+f*x]],x] - d/c*Int[Csc[e+f*x]/(Sqrt[a+b*Csc[e+f*x]]*(c+d*Csc[e+f*x])),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0]

4.  ∫(((a+b Sec[e+f x]))^m)(((c+d Sec[e+f x]))^n)dx  when  b c-a d≠0 ∧ (m^2)==(n^2)==(1/4)

1.  ∫(Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])dx  when  b c-a d≠0

1:  ∫(Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)==0

Derivation: Piecewise constant extraction

Basis: If  (a^2)-(b^2)==0 ∧ (c^2)-(d^2)==0, then (∂_x)(((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]]))/(Tan[e+f x]))==0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)==0, then

∫(Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])dx  ⟶  (((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]]))/(Tan[e+f x])) ∫Tan[e+f x]dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]*Sqrt[c_+d_.*csc[e_.+f_.*x_]],x_Symbol] :=
  Sqrt[a+b*Csc[e+f*x]]*Sqrt[c+d*Csc[e+f*x]]/Cot[e+f*x]*Int[Cot[e+f*x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && EqQ[c^2-d^2,0]

2:  ∫(Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])dx  when  b c-a d≠0

Derivation: Algebraic expansion

Basis: (Sqrt[c+d z])==(c/(Sqrt[c+d z]))+((d z)/(Sqrt[c+d z]))

Rule: If  b c-a d≠0, then

∫(Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])dx  ⟶  c∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[c+d Sec[e+f x]]))dx+d∫((Sec[e+f x] (Sqrt[a+b Sec[e+f x]]))/(Sqrt[c+d Sec[e+f x]]))dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]*Sqrt[c_+d_.*csc[e_.+f_.*x_]],x_Symbol] :=
  c*Int[Sqrt[a+b*Csc[e+f*x]]/Sqrt[c+d*Csc[e+f*x]],x] + 
  d*Int[Csc[e+f*x]*Sqrt[a+b*Csc[e+f*x]]/Sqrt[c+d*Csc[e+f*x]],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0]

2.  ∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[c+d Sec[e+f x]]))dx  when  b c-a d≠0

1.  ∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[c+d Sec[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0

1:  ∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[c+d Sec[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)==0

Derivation: Algebraic expansion

Basis: (1/(Sqrt[c+d z]))==((Sqrt[c+d z])/c)-((d z)/(c (Sqrt[c+d z])))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)==0, then

∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[c+d Sec[e+f x]]))dx  ⟶  (1/c)∫(Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])dx-(d/c)∫((Sec[e+f x] (Sqrt[a+b Sec[e+f x]]))/(Sqrt[c+d Sec[e+f x]]))dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]/Sqrt[c_+d_.*csc[e_.+f_.*x_]],x_Symbol] :=
  1/c*Int[Sqrt[a+b*Csc[e+f*x]]*Sqrt[c+d*Csc[e+f*x]],x] - 
  d/c*Int[Csc[e+f*x]*Sqrt[a+b*Csc[e+f*x]]/Sqrt[c+d*Csc[e+f*x]],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && EqQ[c^2-d^2,0]

2:  ∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[c+d Sec[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0

Derivation: Integration by substitution

Basis: If  (a^2)-(b^2)==0, then ((Sqrt[a+b Sec[e+f x]])/(Sqrt[c+d Sec[e+f x]]))==((2 a)/f) Subst[(1/(1+a c (x^2))),x,((Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))] (∂_x)((Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0, then

∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[c+d Sec[e+f x]]))dx  ⟶  ((2 a)/f) Subst[∫(1/(1+a c (x^2)))dx,x,((Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))]

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]/Sqrt[c_+d_.*csc[e_.+f_.*x_]],x_Symbol] :=
  -2*a/f*Subst[Int[1/(1+a*c*x^2),x],x,Cot[e+f*x]/(Sqrt[a+b*Csc[e+f*x]]*Sqrt[c+d*Csc[e+f*x]])] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0]

2.  ∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[c+d Sec[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0

1:  ∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[c+d Sec[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)==0

Derivation: Algebraic expansion

Basis: ((Sqrt[a+b z])/(Sqrt[c+d z]))==((a (Sqrt[c+d z]))/(c (Sqrt[a+b z])))+(((b c-a d) z)/(c (Sqrt[a+b z]) (Sqrt[c+d z])))

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)==0, then

∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[c+d Sec[e+f x]]))dx  ⟶  (a/c)∫((Sqrt[c+d Sec[e+f x]])/(Sqrt[a+b Sec[e+f x]]))dx+((b c-a d)/c)∫((Sec[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]/Sqrt[c_+d_.*csc[e_.+f_.*x_]],x_Symbol] :=
  a/c*Int[Sqrt[c+d*Csc[e+f*x]]/Sqrt[a+b*Csc[e+f*x]],x] + 
  (b*c-a*d)/c*Int[Csc[e+f*x]/(Sqrt[a+b*Csc[e+f*x]]*Sqrt[c+d*Csc[e+f*x]]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && EqQ[c^2-d^2,0]

2:  ∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[c+d Sec[e+f x]]))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)≠0 ∧ (c^2)-(d^2)≠0, then

∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[c+d Sec[e+f x]]))dx  ⟶  
-((2(a+b Sec[e+f x]))/(c f(Sqrt[((a+b)/(c+d))])Tan[e+f x]))(Sqrt[(((b c-a d) (1+Sec[e+f x]))/((c-d) (a+b Sec[e+f x])))])(Sqrt[-(((b c-a d) (1-Sec[e+f x]))/((c+d) (a+b Sec[e+f x])))])EllipticPi[((a(c+d))/(c(a+b))),ArcSin[(Sqrt[((a+b)/(c+d))])((Sqrt[c+d Sec[e+f x]])/(Sqrt[a+b Sec[e+f x]]))],(((a-b) (c+d))/((a+b) (c-d)))]

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]/Sqrt[c_+d_.*csc[e_.+f_.*x_]],x_Symbol] :=
  2*(a+b*Csc[e+f*x])/(c*f*Rt[(a+b)/(c+d),2]*Cot[e+f*x])*
    Sqrt[(b*c-a*d)*(1+Csc[e+f*x])/((c-d)*(a+b*Csc[e+f*x]))]*
    Sqrt[-(b*c-a*d)*(1-Csc[e+f*x])/((c+d)*(a+b*Csc[e+f*x]))]*
    EllipticPi[a*(c+d)/(c*(a+b)),ArcSin[Rt[(a+b)/(c+d),2]*Sqrt[c+d*Csc[e+f*x]]/Sqrt[a+b*Csc[e+f*x]]],(a-b)*(c+d)/((a+b)*(c-d))] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[a^2-b^2,0] && NeQ[c^2-d^2,0]

3.  ∫(1/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))dx  when  b c-a d≠0

1:  ∫(1/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)==0

Derivation: Piecewise constant extraction

Basis: If  (a^2)-(b^2)==0 ∧ (c^2)-(d^2)==0, then (∂_x)((Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))==0

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)==0, then

∫(1/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))dx  ⟶  ((Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]]))) ∫(1/(Tan[e+f x]))dx

Program code:

Int[1/(Sqrt[a_+b_.*csc[e_.+f_.*x_]]*Sqrt[c_+d_.*csc[e_.+f_.*x_]]),x_Symbol] :=
  Cot[e+f*x]/(Sqrt[a+b*Csc[e+f*x]]*Sqrt[c+d*Csc[e+f*x]])*Int[1/Cot[e+f*x],x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && EqQ[c^2-d^2,0]

2:  ∫(1/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))dx  when  b c-a d≠0

Derivation: Algebraic expansion

Basis: (1/(Sqrt[a+b z]))==(1/a) (Sqrt[a+b z]) -((b z)/(a(Sqrt[a+b z])))

Rule: If  b c-a d≠0, then

∫(1/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))dx  ⟶  (1/a)∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[c+d Sec[e+f x]]))dx-(b/a)∫((Sec[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[c+d Sec[e+f x]])))dx

Program code:

Int[1/(Sqrt[a_+b_.*csc[e_.+f_.*x_]]*Sqrt[c_+d_.*csc[e_.+f_.*x_]]),x_Symbol] :=
  1/a*Int[Sqrt[a+b*Csc[e+f*x]]/Sqrt[c+d*Csc[e+f*x]],x] - 
  b/a*Int[Csc[e+f*x]/(Sqrt[a+b*Csc[e+f*x]]*Sqrt[c+d*Csc[e+f*x]]),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0]

5:  ∫((Sqrt[a+b Sec[e+f x]])/(((c+d Sec[e+f x]))^(3/2)))dx  when  b c-a d≠0 ∧ (c^2)-(d^2)≠0

Derivation: Algebraic expansion

Basis: (1/(c+d z))==(1/c)-((d z)/(c (c+d z)))

Rule: If  b c-a d≠0 ∧ (c^2)-(d^2)≠0, then

∫((Sqrt[a+b Sec[e+f x]])/(((c+d Sec[e+f x]))^(3/2)))dx  ⟶  (1/c)∫((Sqrt[a+b Sec[e+f x]])/(Sqrt[c+d Sec[e+f x]]))dx-(d/c)∫((Sec[e+f x](Sqrt[a+b Sec[e+f x]]))/(((c+d Sec[e+f x]))^(3/2)))dx

Program code:

Int[Sqrt[a_+b_.*csc[e_.+f_.*x_]]/(c_+d_.*csc[e_.+f_.*x_])^(3/2),x_Symbol] :=
  1/c*Int[Sqrt[a+b*Csc[e+f*x]]/Sqrt[c+d*Csc[e+f*x]],x] - 
  d/c*Int[Csc[e+f*x]*Sqrt[a+b*Csc[e+f*x]]/(c+d*Csc[e+f*x])^(3/2),x] /;
FreeQ[{a,b,c,d,e,f},x] && NeQ[b*c-a*d,0] && NeQ[c^2-d^2,0]

6:  ∫(((a+b Sec[e+f x]))^m)(((c+d Sec[e+f x]))^n)dx  when  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m-(1/2)∈ℤ

Derivation: Piecewise constant extraction and integration by substitution

Basis: If  (a^2)-(b^2)==0, then (∂_x)(( Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[a-b Sec[e+f x]])))==0

Basis: If  (a^2)-(b^2)==0, then -(((a^2) Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[a-b Sec[e+f x]])))(( Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[a-b Sec[e+f x]])))==1

Basis: Tan[e+f x]==(1/f) Subst[(1/x),x,Sec[e+f x]] (∂_x)Sec[e+f x]

Rule: If  b c-a d≠0 ∧ (a^2)-(b^2)==0 ∧ (c^2)-(d^2)≠0 ∧ m-(1/2)∈ℤ, then

∫(((a+b Sec[e+f x]))^m)(((c+d Sec[e+f x]))^n)dx  ⟶  

-(((a^2) Tan[e+f x])/((Sqrt[a+b Sec[e+f x]]) (Sqrt[a-b Sec[e+f x]])))∫((Tan[e+f x] (((a+b Sec[e+f x]))^(m-(1/2))) (((c+d Sec[e+f x]))^n))/(Sqrt[a-b Sec[e+f x]]))dx  ⟶  

-(((a^2) Tan[e+f x])/(f (Sqrt[a+b Sec[e+f x]]) (Sqrt[a-b Sec[e+f x]])))Subst[∫(((((a+b x))^(m-(1/2))) (((c+d x))^n))/(x (Sqrt[a-b x])))dx,x,Sec[e+f x]]

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_.*(c_+d_.*csc[e_.+f_.*x_])^n_.,x_Symbol] :=
  a^2*Cot[e+f*x]/(f*Sqrt[a+b*Csc[e+f*x]]*Sqrt[a-b*Csc[e+f*x]])*
    Subst[Int[(a+b*x)^(m-1/2)*(c+d*x)^n/(x*Sqrt[a-b*x]),x],x,Csc[e+f*x]] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && NeQ[b*c-a*d,0] && EqQ[a^2-b^2,0] && NeQ[c^2-d^2,0] && IntegerQ[m-1/2]

7.  ∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  when  b c-a d≠0 ∧ m+n∈ℤ

1:  ∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  when  b c-a d≠0 ∧ m∈ℤ ∧ n∈ℤ

Derivation: Algebraic simplification

Basis: If  m+n∈ℤ ∧ m∈ℤ, then (((a+b Sec[z]))^m) (((c+d Sec[z]))^n)==(((((b+a Cos[z]))^m) (((d+c Cos[z]))^n))/((Cos[z])^(m+n)))

Note: The restriction m+n∈{0,-1,-2} can be lifted if and when the cosine integration rules are extended to handle integrands of the form  ((Cos[e+f x])^p)(((a+b Cos[e+f x]))^m) (((c+d Cos[e+f x]))^n) for arbitray p.

Rule: If  b c-a d≠0 ∧ m∈ℤ ∧ n∈ℤ, then

∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  ⟶  ∫(((((b+a Cos[e+f x]))^m) (((d+c Cos[e+f x]))^n))/((Cos[e+f x])^(m+n)))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(c_+d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  Int[(b+a*Sin[e+f*x])^m*(d+c*Sin[e+f*x])^n/Sin[e+f*x]^(m+n),x] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && NeQ[b*c-a*d,0] && IntegerQ[m] && IntegerQ[n] && LeQ[-2,m+n,0]

2:  ∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  when  b c-a d≠0 ∧ m+(1/2)∈ℤ ∧ n+(1/2)∈ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)(((Sqrt[d+c Cos[e+f x]]) (Sqrt[a+b Sec[e+f x]]))/((Sqrt[b+a Cos[e+f x]]) (Sqrt[c+d Sec[e+f x]])))==0

Note: The restriction m+n∈{0,-1,-2} can be lifted if and when the cosine integration rules are extended to handle integrands of the form  ((Cos[e+f x])^p)(((a+b Cos[e+f x]))^m) (((c+d Cos[e+f x]))^n) for arbitray p.

Rule: If  b c-a d≠0 ∧ m+(1/2)∈ℤ ∧ n+(1/2)∈ℤ, then

∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  ⟶  (((Sqrt[d+c Cos[e+f x]]) (Sqrt[a+b Sec[e+f x]]))/((Sqrt[b+a Cos[e+f x]]) (Sqrt[c+d Sec[e+f x]])))∫(((((b+a Cos[e+f x]))^m) (((d+c Cos[e+f x]))^n))/((Cos[e+f x])^(m+n)))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(c_+d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  Sqrt[d+c*Sin[e+f*x]]*Sqrt[a+b*Csc[e+f*x]]/(Sqrt[b+a*Sin[e+f*x]]*Sqrt[c+d*Csc[e+f*x]])*
    Int[(b+a*Sin[e+f*x])^m*(d+c*Sin[e+f*x])^n/Sin[e+f*x]^(m+n),x] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && NeQ[b*c-a*d,0] && IntegerQ[m+1/2] && IntegerQ[n+1/2] && LeQ[-2,m+n,0]

3:  ∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  when  b c-a d≠0 ∧ m+n==0 ∧ 2m∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((Cos[e+f x])^(m+n))(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n))/((((b+a Cos[e+f x]))^m) (((d+c Cos[e+f x]))^n)))==0

Rule: If  b c-a d≠0 ∧ m+n==0 ∧ 2m∉ℤ, then

∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  ⟶  ((((Cos[e+f x])^(m+n))(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n))/((((b+a Cos[e+f x]))^m) (((d+c Cos[e+f x]))^n)))∫(((((b+a Cos[e+f x]))^m) (((d+c Cos[e+f x]))^n))/((Cos[e+f x])^(m+n)))dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(c_+d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  Sin[e+f*x]^(m+n)*(a+b*Csc[e+f*x])^m*(c+d*Csc[e+f*x])^n/((b+a*Sin[e+f*x])^m*(d+c*Sin[e+f*x])^n)*
    Int[(b+a*Sin[e+f*x])^m*(d+c*Sin[e+f*x])^n/Sin[e+f*x]^Simplify[m+n],x] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && NeQ[b*c-a*d,0] && EqQ[m+n,0] && Not[IntegerQ[2*m]]

8:  ∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  when  n∈(SuperPlus[ℤ])

Derivation: Algebraic expansion

Rule: If  n∈(SuperPlus[ℤ]), then

∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  ⟶  ∫(((a+b Sec[e+f x]))^m) ExpandTrig[(((c+d Sec[e+f x]))^n),x]dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_*(c_+d_.*csc[e_.+f_.*x_])^n_,x_Symbol] :=
  Int[ExpandTrig[(a+b*csc[e+f*x])^m,(c+d*csc[e+f*x])^n,x],x] /;
FreeQ[{a,b,c,d,e,f,m,n},x] && IGtQ[n,0]

X:  ∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx

Rule:

∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx  ⟶  ∫(((a+b Sec[e+f x]))^m) (((c+d Sec[e+f x]))^n)dx

Program code:

Int[(a_+b_.*csc[e_.+f_.*x_])^m_.*(c_+d_.*csc[e_.+f_.*x_])^n_.,x_Symbol] :=
  Unintegrable[(a+b*Csc[e+f*x])^m*(c+d*Csc[e+f*x])^n,x] /;
FreeQ[{a,b,c,d,e,f,m,n},x]

Rules for integrands of the form (((a+b Sec[e+f x]))^m) (((c (((d Sec[e+f x]))^p)))^n)

1:  ∫(((a+b Sec[e+f x]))^m) (((d Cos[e+f x]))^n)dx  when  n∉ℤ ∧ m∈ℤ

Derivation: Algebraic simplification

Basis: If  m∈ℤ, then (((a+b Sec[z]))^m)==(((d^m)(((b+a Cos[z]))^m))/(((d Cos[z]))^m))

Rule: If  n∉ℤ ∧ m∈ℤ, then

∫(((a+b Sec[e+f x]))^m) (((d Cos[e+f x]))^n)dx  ⟶  (d^m)∫(((b+a Cos[e+f x]))^m) (((d Cos[e+f x]))^(n-m))dx

Program code:

Int[(a_.+b_.*sec[e_.+f_.*x_])^m_.*(d_./sec[e_.+f_.*x_])^n_,x_Symbol] :=
  d^m*Int[(b+a*Cos[e+f*x])^m*(d*Cos[e+f*x])^(n-m),x] /;
FreeQ[{a,b,d,e,f,n},x] && Not[IntegerQ[n]] && IntegerQ[m]

Int[(a_.+b_.*csc[e_.+f_.*x_])^m_.*(d_./csc[e_.+f_.*x_])^n_,x_Symbol] :=
  d^m*Int[(b+a*Sin[e+f*x])^m*(d*Sin[e+f*x])^(n-m),x] /;
FreeQ[{a,b,d,e,f,n},x] && Not[IntegerQ[n]] && IntegerQ[m]

2:  ∫(((a+b Sec[e+f x]))^m) (((c (((d Sec[e+f x]))^p)))^n)dx  when  n∉ℤ

Derivation: Piecewise constant extraction

Basis: (∂_x)((((c (((d Sec[e+f x]))^p)))^n)/(((d Sec[e+f x]))^(n p)))==0

Rule: If  n∉ℤ, then

∫(((a+b Sec[e+f x]))^m) (((c (((d Sec[e+f x]))^p)))^n)dx  ⟶  (((c^(IntPart[n])) (((c (((d Sec[e+f x]))^p)))^(FracPart[n])))/(((d Sec[e+f x]))^(p FracPart[n])))∫(((a+b Sec[e+f x]))^m) (((d Sec[e+f x]))^(n p))dx

Program code:

Int[(a_.+b_.*sec[e_.+f_.*x_])^m_.*(c_.*(d_.*sec[e_.+f_.*x_])^p_)^n_,x_Symbol] :=
  c^IntPart[n]*(c*(d*Sec[e + f*x])^p)^FracPart[n]/(d*Sec[e + f*x])^(p*FracPart[n])*
    Int[(a+b*Sec[e+f*x])^m*(d*Sec[e+f*x])^(n*p),x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x] && Not[IntegerQ[n]]

Int[(a_.+b_.*csc[e_.+f_.*x_])^m_.*(c_.*(d_.*csc[e_.+f_.*x_])^p_)^n_,x_Symbol] :=
  c^IntPart[n]*(c*(d*Csc[e + f*x])^p)^FracPart[n]/(d*Csc[e + f*x])^(p*FracPart[n])*
    Int[(a+b*Cos[e+f*x])^m*(d*Cos[e+f*x])^(n*p),x] /;
FreeQ[{a,b,c,d,e,f,m,n,p},x] && Not[IntegerQ[n]]